//                 64bit * 64K Word RAM module for YSYX210152_Simulation
//  NOTE : This is a RAM  only for YSYX210152_Simulation, DO NOT USE IT IN REAL IMP!
`include "PRV564Config.v"
`include "PRV564Define.v"
module simRAM(
    input wire                     SRAM_CLKi,
    input wire                     SRAM_WREN,
    input wire [7:0]               SRAM_BSEL,
    input wire [`XLEN-1:0]         SRAM_ADDR,
    input wire [`XLEN-1:0]         SRAM_DATAi,
    output reg [`XLEN-1:0]         SRAM_DATAo
);
    reg [63:0]  BRAM64[65535:0];      //16K Word * 8Byte RAM
initial
begin 
	$readmemh("InitHex.txt",BRAM64);
	#5 SRAM_DATAo <= 64'h0;
end
always@(posedge SRAM_CLKi)begin
    BRAM64[SRAM_ADDR] <= SRAM_DATAi;
end
always@(*)begin
    SRAM_DATAo <= BRAM64[SRAM_ADDR];
end


endmodule
